<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    function uniqueNums(n){
        var arr=[]
        for(i=0;i<n;i++){
            var a=Math.floor(Math.random()*(32-2+1)+2)
            if(arr.indexOf(a)==-1){
                arr.push(a)
            }else{
                i--
            }
        }
        
        return arr
    }
    console.log(uniqueNums(15));
    
</script>